def bucker_sort(li,n=100,max_nmm=10000):
    bucket = [[] for _ in range(n)]
    for value in li:
        bucket_index = value // 100
        bucket[bucket_index].append(value)
        for i in range(len(bucket[bucket_index])-1,0,-1):
            if bucket[bucket_index][i] < bucket[bucket_index][i-1]:
                bucket[bucket_index][i],bucket[bucket_index][i-1] = bucket[bucket_index][i-1],bucket[bucket_index][i]
            else:
                break
    print(bucket)
    li.clear()

    for i in bucket:
        for j in i:
            li.append(j)


import random

li = [random.randint(0,10000) for i in range(100)]
print(li)

bucker_sort(li)
print(li)
